package com.hgyc.mom.tool.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.hgyc.mom.common.annotation.Excel;
import com.hgyc.mom.core.mybatis.Like;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 编码生成规则
 * </p>
 *
 * @author fwj
 * @since 2025-05-06
 */
@Data
@TableName("tool_auto_code_rule")
@Schema(name="编码生成规则对象", description="编码生成规则对象")
public class AutoCodeRule implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "规则ID")
    private Long id;

    @Excel(name = "规则编码")
    @Like
    @Schema(description = "规则编码")
    private String ruleCode;

    @Excel(name = "规则名称")
    @Like
    @Schema(description = "规则名称")
    private String ruleName;

    @Excel(name = "最大长度")
    @Schema(description = "最大长度")
    private Integer maxLength;

    @Excel(name = "是否补齐")
    @Schema(description = "是否补齐")
    private String isPadded;

    @Excel(name = "补齐字符")
    @Schema(description = "补齐字符")
    private String paddedChar;

    @Excel(name = "补齐方式")
    @Schema(description = "补齐方式")
    private String paddedMethod;

    @Excel(name = "是否启用")
    @Schema(description = "是否启用")
    private String enableFlag;

    @Excel(name = "备注")
    @Schema(description = "备注")
    private String description;

    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建者")
    private Long createBy;

    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.UPDATE)
    @Schema(description = "更新者")
    private Long updateBy;

    @TableField(fill = FieldFill.UPDATE)
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

}